package lab02.test11;

/**
 * Created by dell on 2017/11/11.
 */
public class Rectangle implements Printx {
    //属性：长，宽，面积，周长，对角线长
    float length=2, width=3, area,
            perimeter;
    public float getArea(){
        return length*width;
    }
    public float getPerimeter(){
        return 2*(length+width);
    }
    public void printMyWay(){
        System.out.println("该矩形的长length="+length+"宽width="+width);
        System.out.println("该矩形的面积s="+getArea());
        System.out.println("该矩形的周长c="+getPerimeter());
    }
}
